package com.education.platform.common.web;

/**
 * 统一响应类型
 */
public enum ResponseCode {

    SUCCESS(1000, "成功"),

    VALIDATE_FAIL(3000, "校验失败"),

    BUSINESS_FAIL(4000, "业务异常"),
    NOT_ENOUGH(4010, "余额不足"),
    INTERNAL_ERROR(5000, "内部服务器异常"),

    OVER_TIME(6000,"登录超时");

    /**
     * 编码
     */
    private Integer code;
    /**
     * 描述
     */
    private String desc;

    ResponseCode(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public ResponseCode setCode(Integer code) {
        this.code = code;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public ResponseCode setDesc(String desc) {
        this.desc = desc;
        return this;
    }

}
